3.1.30 \(\int \frac {(a+b \log (c x^n)) \log (d (\frac {1}{d}+f x^2))}{x^2} \, dx\) [30]

3.1.30.1 Optimal result
3.1.30.2 Mathematica [A] (verified)
3.1.30.3 Rubi [A] (verified)
3.1.30.4 Maple [C] (warning: unable to verify)
3.1.30.5 Fricas [F]
3.1.30.6 Sympy [F]
3.1.30.7 Maxima [F]
3.1.30.8 Giac [F]
3.1.30.9 Mupad [F(-1)]

3.1.30.1 Optimal result

Integrand size = 26, antiderivative size = 169 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^2} \, dx=2 b \sqrt {d} \sqrt {f} n \arctan \left (\sqrt {d} \sqrt {f} x\right )+2 \sqrt {d} \sqrt {f} \arctan \left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log \left (1+d f x^2\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{x}-i b \sqrt {d} \sqrt {f} n \operatorname {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )+i b \sqrt {d} \sqrt {f} n \operatorname {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right ) \]

output
-b*n*ln(d*f*x^2+1)/x-(a+b*ln(c*x^n))*ln(d*f*x^2+1)/x+2*b*n*arctan(x*d^(1/2 
)*f^(1/2))*d^(1/2)*f^(1/2)+2*arctan(x*d^(1/2)*f^(1/2))*(a+b*ln(c*x^n))*d^( 
1/2)*f^(1/2)-I*b*n*polylog(2,-I*x*d^(1/2)*f^(1/2))*d^(1/2)*f^(1/2)+I*b*n*p 
olylog(2,I*x*d^(1/2)*f^(1/2))*d^(1/2)*f^(1/2)
 
3.1.30.2 Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.31 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^2} \, dx=2 a \sqrt {d} \sqrt {f} \arctan \left (\sqrt {d} \sqrt {f} x\right )+2 b \sqrt {d} \sqrt {f} \arctan \left (\sqrt {d} \sqrt {f} x\right ) \left (n-n \log (x)+\log \left (c x^n\right )\right )-\frac {a \log \left (1+d f x^2\right )}{x}-\frac {b \left (n+\log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{x}+2 b d f n \left (-\frac {i \left (\log (x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )+\operatorname {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )\right )}{2 \sqrt {d} \sqrt {f}}+\frac {i \left (\log (x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )+\operatorname {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )\right )}{2 \sqrt {d} \sqrt {f}}\right ) \]

input
Integrate[((a + b*Log[c*x^n])*Log[d*(d^(-1) + f*x^2)])/x^2,x]
 
output
2*a*Sqrt[d]*Sqrt[f]*ArcTan[Sqrt[d]*Sqrt[f]*x] + 2*b*Sqrt[d]*Sqrt[f]*ArcTan 
[Sqrt[d]*Sqrt[f]*x]*(n - n*Log[x] + Log[c*x^n]) - (a*Log[1 + d*f*x^2])/x - 
 (b*(n + Log[c*x^n])*Log[1 + d*f*x^2])/x + 2*b*d*f*n*(((-1/2*I)*(Log[x]*Lo 
g[1 + I*Sqrt[d]*Sqrt[f]*x] + PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x]))/(Sqrt[d] 
*Sqrt[f]) + ((I/2)*(Log[x]*Log[1 - I*Sqrt[d]*Sqrt[f]*x] + PolyLog[2, I*Sqr 
t[d]*Sqrt[f]*x]))/(Sqrt[d]*Sqrt[f]))
 
3.1.30.3 Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 165, normalized size of antiderivative = 0.98, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {2823, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\log \left (d \left (\frac {1}{d}+f x^2\right )\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx\)

\(\Big \downarrow \) 2823

\(\displaystyle -b n \int \left (\frac {2 \sqrt {d} \sqrt {f} \arctan \left (\sqrt {d} \sqrt {f} x\right )}{x}-\frac {\log \left (d f x^2+1\right )}{x^2}\right )dx+2 \sqrt {d} \sqrt {f} \arctan \left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{x}\)

\(\Big \downarrow \) 2009

\(\displaystyle 2 \sqrt {d} \sqrt {f} \arctan \left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{x}-b n \left (-2 \sqrt {d} \sqrt {f} \arctan \left (\sqrt {d} \sqrt {f} x\right )+i \sqrt {d} \sqrt {f} \operatorname {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )-i \sqrt {d} \sqrt {f} \operatorname {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )+\frac {\log \left (d f x^2+1\right )}{x}\right )\)

input
Int[((a + b*Log[c*x^n])*Log[d*(d^(-1) + f*x^2)])/x^2,x]
 
output
2*Sqrt[d]*Sqrt[f]*ArcTan[Sqrt[d]*Sqrt[f]*x]*(a + b*Log[c*x^n]) - ((a + b*L 
og[c*x^n])*Log[1 + d*f*x^2])/x - b*n*(-2*Sqrt[d]*Sqrt[f]*ArcTan[Sqrt[d]*Sq 
rt[f]*x] + Log[1 + d*f*x^2]/x + I*Sqrt[d]*Sqrt[f]*PolyLog[2, (-I)*Sqrt[d]* 
Sqrt[f]*x] - I*Sqrt[d]*Sqrt[f]*PolyLog[2, I*Sqrt[d]*Sqrt[f]*x])
 

3.1.30.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2823
Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_. 
)]*(b_.))*((g_.)*(x_))^(q_.), x_Symbol] :> With[{u = IntHide[(g*x)^q*Log[d* 
(e + f*x^m)^r], x]}, Simp[(a + b*Log[c*x^n])   u, x] - Simp[b*n   Int[1/x 
 u, x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q 
+ 1)/m] || (RationalQ[m] && RationalQ[q])) && NeQ[q, -1]
 
3.1.30.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 4.49 (sec) , antiderivative size = 316, normalized size of antiderivative = 1.87

method result size
risch \(-\frac {\ln \left (d f \,x^{2}+1\right ) \ln \left (x^{n}\right ) b}{x}-\frac {2 b \arctan \left (\frac {x d f}{\sqrt {d f}}\right ) n \ln \left (x \right ) d f}{\sqrt {d f}}+\frac {2 b \arctan \left (\frac {x d f}{\sqrt {d f}}\right ) \ln \left (x^{n}\right ) d f}{\sqrt {d f}}-\frac {b n \ln \left (d f \,x^{2}+1\right )}{x}+\frac {2 b n \arctan \left (\frac {x d f}{\sqrt {d f}}\right ) d f}{\sqrt {d f}}-b n \sqrt {-d f}\, \ln \left (x \right ) \ln \left (1+x \sqrt {-d f}\right )+b n \sqrt {-d f}\, \ln \left (x \right ) \ln \left (1-x \sqrt {-d f}\right )-b n \sqrt {-d f}\, \operatorname {dilog}\left (1+x \sqrt {-d f}\right )+b n \sqrt {-d f}\, \operatorname {dilog}\left (1-x \sqrt {-d f}\right )+\left (-\frac {i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )}{2}+\frac {i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}+\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2}+b \ln \left (c \right )+a \right ) \left (-\frac {\ln \left (d f \,x^{2}+1\right )}{x}+\frac {2 d f \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}\right )\) \(316\)

input
int((a+b*ln(c*x^n))*ln(d*(1/d+f*x^2))/x^2,x,method=_RETURNVERBOSE)
 
output
-ln(d*f*x^2+1)/x*ln(x^n)*b-2/(d*f)^(1/2)*b*arctan(x*d*f/(d*f)^(1/2))*n*ln( 
x)*d*f+2/(d*f)^(1/2)*b*arctan(x*d*f/(d*f)^(1/2))*ln(x^n)*d*f-b*n*ln(d*f*x^ 
2+1)/x+2/(d*f)^(1/2)*b*n*arctan(x*d*f/(d*f)^(1/2))*d*f-b*n*(-d*f)^(1/2)*ln 
(x)*ln(1+x*(-d*f)^(1/2))+b*n*(-d*f)^(1/2)*ln(x)*ln(1-x*(-d*f)^(1/2))-b*n*( 
-d*f)^(1/2)*dilog(1+x*(-d*f)^(1/2))+b*n*(-d*f)^(1/2)*dilog(1-x*(-d*f)^(1/2 
))+(-1/2*I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+1/2*I*b*Pi*csgn(I*c)*c 
sgn(I*c*x^n)^2+1/2*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-1/2*I*b*Pi*csgn(I*c* 
x^n)^3+b*ln(c)+a)*(-1/x*ln(d*f*x^2+1)+2*d*f/(d*f)^(1/2)*arctan(x*d*f/(d*f) 
^(1/2)))
 
3.1.30.5 Fricas [F]

\[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^2} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )} \log \left ({\left (f x^{2} + \frac {1}{d}\right )} d\right )}{x^{2}} \,d x } \]

input
integrate((a+b*log(c*x^n))*log(d*(1/d+f*x^2))/x^2,x, algorithm="fricas")
 
output
integral((b*log(d*f*x^2 + 1)*log(c*x^n) + a*log(d*f*x^2 + 1))/x^2, x)
 
3.1.30.6 Sympy [F]

\[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^2} \, dx=\int \frac {\left (a + b \log {\left (c x^{n} \right )}\right ) \log {\left (d f x^{2} + 1 \right )}}{x^{2}}\, dx \]

input
integrate((a+b*ln(c*x**n))*ln(d*(1/d+f*x**2))/x**2,x)
 
output
Integral((a + b*log(c*x**n))*log(d*f*x**2 + 1)/x**2, x)
 
3.1.30.7 Maxima [F]

\[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^2} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )} \log \left ({\left (f x^{2} + \frac {1}{d}\right )} d\right )}{x^{2}} \,d x } \]

input
integrate((a+b*log(c*x^n))*log(d*(1/d+f*x^2))/x^2,x, algorithm="maxima")
 
output
-(b*(n + log(c)) + b*log(x^n) + a)*log(d*f*x^2 + 1)/x + integrate(2*(b*d*f 
*log(x^n) + a*d*f + (d*f*n + d*f*log(c))*b)/(d*f*x^2 + 1), x)
 
3.1.30.8 Giac [F]

\[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^2} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )} \log \left ({\left (f x^{2} + \frac {1}{d}\right )} d\right )}{x^{2}} \,d x } \]

input
integrate((a+b*log(c*x^n))*log(d*(1/d+f*x^2))/x^2,x, algorithm="giac")
 
output
integrate((b*log(c*x^n) + a)*log((f*x^2 + 1/d)*d)/x^2, x)
 
3.1.30.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^2} \, dx=\int \frac {\ln \left (d\,\left (f\,x^2+\frac {1}{d}\right )\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x^2} \,d x \]

input
int((log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n)))/x^2,x)
 
output
int((log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n)))/x^2, x)